<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta http-equiv="pragma" content="no-cache"> 
		<meta http-equiv="cache-control" content="no-cache"> 
		<meta http-equiv="expires" content="0"> 
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge">
		<title>东东推头部</title>
		<link href="../static/bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet">
		<link href="../static/css/common.css" rel="stylesheet">
		<link href="../static/css/index.css" rel="stylesheet">
		<link rel="stylesheet" href="../static/jquery-qtip/jquery.qtip.min.css" />
	</head>
	<body>
		<div class="container-fluid">
			<!-- 头部 -->
			<div class="container-fluid heard">
				<div class="container">
					<nav class="navbar navbar-default">
					  <div class="container-fluid">
					    <div class="navbar-header">
					      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
					        <span class="sr-only">Toggle navigation</span>
					        <span class="icon-bar"></span>
					        <span class="icon-bar"></span>
					        <span class="icon-bar"></span>
					      </button>
					      <a class="navbar-brand heard-WXQQ" >您好，欢迎来到东东推！东东推软件用户群：66344187 东东推官方采集群：584366864 东东推创始人微信号：sqe541</a>
					    </div>
					
					    <div class="collapse navbar-collapse heard-right" id="bs-example-navbar-collapse-1">
					      <ul class="nav navbar-nav navbar-right">
					        <li><a href="../templates/back/chainTool/chainTool.html">转链工具</a></li>
					        <li><a href="#">放单中心</a></li>
					        <li class="loginSuc"><a href="../templates/back/personal/personal.html">个人中心</a></li>
					        <li class="loginSuc"><a id="returnBut">退出</a></li>
					        <li class="loginNO"><a onclick="javascript:window.location.href='login.html'"style="padding-right: 0;">登录&nbsp;|</a></li>
					        <li class="loginNO"><a onclick="javascript:window.location.href='register.html'" href="#"style="padding-left: 0;">&nbsp;注册</a></li>
					      </ul>
					    </div>
					  </div>
					</nav>
				</div>
			</div>
			
			<div class="ddtCustom">
				<ul>
					<li id="lineCus">东东推在线客服</li>
					<li id="group">软件交流群：418768461</li>
					<li id="offGroup">官方采集群：418768461</li>
				</ul>
			</div>
			
			<!-- banner+搜索+二维码 -->
			<div class="container-fluid" >
				<div class="container" >
					<div class="row" style="padding: 2% 15px;">
						<div class="col-xs-12 col-sm-3" style="margin-top: 1%;"> 
							<img src="../static/images/logo2.png" onclick="javascript:window.location.href='index.html'" />
						</div>
						<div class="col-xs-12 col-sm-6" style="margin-top: 2%;">
							 <div class="input-group">
						      <input type="text" class="form-control search-input" placeholder="请输入宝贝名称">
						      <span class="input-group-btn">
						        <button class="btn btn-ddt" type="button" id="hearSearch"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
						      </span>
						    </div>
						</div>
						<div class="col-xs-12 col-sm-3 indexEwm" >
							<div class="col-xs-6 text-center" ><img src="../static/images/Group 28.png" ><p>东东推公众号</p></div>
							<div class="col-xs-6 text-center" ><img src="../static/images/Group 28.png" ><p>东东推APP</p></div>
						</div>
					</div>
				</div>
			</div>
			<!-- 中间菜单 -->
			<div class="container-fluid second-menu" >
				<div class="container">
					<nav class="navbar navbar-default">
					  <div class="container-fluid">
					    <div class="navbar-header">
					      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2" aria-expanded="false">
					        <span class="sr-only">Toggle navigation</span>
					        <span class="icon-bar"></span>
					        <span class="icon-bar"></span>
					        <span class="icon-bar"></span>
					      </button>
					    </div>
					    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
					      <ul class="nav navbar-nav">
					      	<li class="dropdown  goodsCategory "> <!-- open -->
					          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">商品分类 <span class="caret"></span></a>
					          <ul class="dropdown-menu" id="menulistHear">
					            <!--<li><a href="#">服务</a></li>
					            <li><a href="#">母婴玩具</a></li>
					            <li><a href="#">美妆个护</a></li>
					            <li><a href="#">居家生活</a></li>
					            <li><a href="#">精品箱包</a></li>
					            <li><a href="#">美食</a></li>
					            <li><a href="#">文体车品</a></li>
					            <li><a href="#">数码电器</a></li>-->
					          </ul>
					        </li>
					        <li><a href="index.html">首页</a></li>
					        <li><a href="newRealTime.html">实时上新</a></li>
					        <li><a href="#">精选好货</a></li>
					        <li><a href="#">优惠劵池</a></li>
					        <li><a href="#">高拥专区</a></li>
					      </ul>
					    </div>
					  </div>
					</nav>
				</div>
			</div>
		</div>
		
	<script src="../static/js/jquery-1.9.1.min.js" type="text/javascript"></script>
	<script src="../static/bootstrap-3.3.7/js/bootstrap.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../static/jquery-qtip/jquery.qtip.min.js" ></script>
	<script>
		$(document).ready(function(){
			var token = localStorage.getItem('token');
			console.log(token)
			if (token != "" && token != null){
				  $(".loginSuc").show();
				  $(".loginNO").hide();
			}else{
				  $(".loginSuc").hide();
				  $(".loginNO").show(); 
			}
			$.ajax({
				url: C.interface.categoryInter,
				type: 'get',
				dataType: 'json',
				data: {},
				success: function(data) {
					if(data.code == "10000") {
						var json = data.data;
						for(var i = 0;i<json.length;i++){
							var html="";
							if(i<=6){
								//console.log(json[i]);
								html += '<li><a href="newRealTime.html">'+json[i].name+'</a></li>'
										
								
							}else if(i == 7){
								html += '<li><a href="newRealTime.html">'+'查看更多'+'</a></li>'
							}
							$("#menulistHear").append(html);
						}
						
					}
				}
			})
			/*搜索点击事件*/
			$("#hearSearch").click(function(){
				var searchVal = $(".search-input").val();
				console.log(searchVal);
				var url = encodeURI("../templates/seach.html?searchVal="+searchVal);
				window.location.href = url;
			});
			$("#returnBut").click(function(){
				$.ajax({
					url:C.interface.quitInter,
					type:'get',
					dataType:'json',
					data:{token:token,appId:'gzh'},
					success:function(data){
						console.log(data);
						if(data.code == "10000"){
							localStorage.setItem("token","");
							alert('确定退出登陆');
							 window.location.reload();
							//window.location.href = "login.html"
						}else{
							localStorage.setItem("token","");
							window.location.href = "login.html"
						}
					}
				})
			})
		});
	</script>
	</body>
</html>
